﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="Sepetim.aspx.cs" Inherits="BeniBastanYaratProject.Uye.Sepetim" %>
<%@ MasterType VirtualPath="~/Main.Master" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 184px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Main_CenterContent" runat="server">
    <h1>Sepetim</h1>
    <h4><asp:Label ID="lblBilgi" runat="server" ForeColor="Red"></asp:Label></h4>
    <asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333" 
        GridLines="None" AutoGenerateColumns="False" Width="600px" 
        DataKeyNames="SepetID,UrunID" onrowdeleting="GridView1_RowDeleting" 
        onrowcommand="GridView1_RowCommand" onrowupdating="GridView1_RowUpdating">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:TemplateField HeaderText="Seç">
                <ItemTemplate>
                    <asp:CheckBox ID="CheckBox1" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                <img src='../<%# Eval("UrunResmiKucuk") %>' alt="" height="50px" width="50px" />
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Sepet No">
                <ItemTemplate>
                    <asp:Label ID="lblSepetID" runat="server" Text='<%# Bind("SepetID") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle HorizontalAlign="Left" />
            </asp:TemplateField>
            <asp:BoundField DataField="UrunAdi" HeaderText="Urun Ad&#305;" >
            <HeaderStyle HorizontalAlign="Left" />
            <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="UrunSezonAciklama" HeaderText="Sezon" >
            <HeaderStyle HorizontalAlign="Left" />
            <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="Adet">
                <ItemTemplate>
                    <asp:TextBox ID="txtAdet" Width="50px" runat="server" Text='<%# Bind("Adet") %>'></asp:TextBox>
                </ItemTemplate>
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle HorizontalAlign="Left" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Fiyati">
                <ItemTemplate>
                    <asp:Label ID="lblFiyat" runat="server" Text='<%# Bind("UrunSatisFiyati") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle HorizontalAlign="Left" />
            </asp:TemplateField>
            <asp:CommandField ShowDeleteButton="True" />
            <asp:TemplateField>
            <ItemTemplate>
                <asp:LinkButton ID="LinkButton1" CommandName="Update" runat="server">Guncelle</asp:LinkButton>
            </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField Visible="False">
                <ItemTemplate>
                    <asp:Label ID="lblUrunID" runat="server" Text='<%# Bind("UrunID") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />

    </asp:GridView>
    <br />
    <table class="style1">
        <tr>
            <td class="style2">
                Teslimat Adresi</td>
            <td>
                <asp:DropDownList ID="DropDownList1" runat="server" Height="16px" Width="141px" 
                    DataSourceID="LinqDataSource1" DataTextField="AdresAdi" 
                    DataValueField="AdresID">
                </asp:DropDownList>
                <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
                    ContextTypeName="BeniBastanYaratProject.DBBaglantiDataContext" 
                    EntityTypeName="" Select="new (AdresID, UserID, AdresAdi)" 
                    TableName="UyeAdreslers" Where="UserID == @UserID">
                    <WhereParameters>
                        <asp:SessionParameter DbType="Guid" Name="UserID" SessionField="uid" />
                    </WhereParameters>
                </asp:LinqDataSource>
            </td>
        </tr>
        <tr>
            <td class="style2">
                &nbsp;</td>
            <td>
    <asp:Button ID="btnSiparisVer" runat="server" Text="Seçilenleri Siparis Ver" 
                    onclick="btnSiparisVer_Click" Width="241px" />



            </td>
        </tr>
    </table>
    <br />
    <br />



</asp:Content>
